<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:rg="http://www.ruijie.com.cn/faces/ui"
	xmlns:c="http://java.sun.com/jstl/core"
	template="template/orderStep2.xhtml">
		<ui:param name="param_action" value="#{orderWizardAction}" />
		<ui:define name="orderFormula">
				<rg:titlePanel headerTitle="配方选择" id="formulaChoose">
					<rg:selectOne id="formula" ajaxValidation="true" enableEmpty="true"
						labelStyle="width:80px;" required="#{orderWizardAction.productType ne null}"
						itemsProvider="#{formulaProvider}" converter="#{formulaConverter}"
						label="选择配方" value="#{orderWizardAction.formula}">
						<a:support event="onchange" actionListener="#{orderWizardAction.loadFormulaInfo()}"
							reRender="formulaBaseInfo_titlePanel,productTable"
							ajaxSingle="true" />
					</rg:selectOne>
				</rg:titlePanel>
				<rg:titlePanel headerTitle="配方基本信息" id="formulaBaseInfo">
					<rg:fieldSet column="single">
						<rg:inputText value="#{orderWizardAction.orderFormula.days}"  required="true" min="1" max="365"
							validateRule="longRange"
							id="formulaDays" label="执行天数" />
						<rg:inputArea value="#{orderWizardAction.orderFormula.beforeBreakfast}" max="256" validateRule="length"
							label="临早餐前" id="formulaBeforeBreakfase" textStyle="width:512px;"/>
						<rg:inputArea value="#{orderWizardAction.orderFormula.afterBreakfast}" max="256" validateRule="length"
							label="早餐后" id="formulaAfterBreakfase" textStyle="width:512px;"/>
						<rg:inputArea value="#{orderWizardAction.orderFormula.beforeLunch}" max="256" validateRule="length"
							label="临午餐前" id="formulbeforeLunch" textStyle="width:512px;"/>
						<rg:inputArea value="#{orderWizardAction.orderFormula.afterLunch}" max="256" validateRule="length"
							label="午餐后" id="formulaAfterLunch" textStyle="width:512px;"/>
						<rg:inputArea value="#{orderWizardAction.orderFormula.beforeDinner}" max="256" validateRule="length"
							label="临晚餐前" id="formulabeforeDinner" textStyle="width:512px;"/>
						<rg:inputArea value="#{orderWizardAction.orderFormula.afterDinner}" max="256" validateRule="length"
							label="晚餐后" id="formulaAfterDinner" textStyle="width:512px;"/>
						<rg:inputArea value="#{orderWizardAction.orderFormula.beforeSleep}" max="256" validateRule="length"
							label="临睡前" id="formulaBeforeSleep" textStyle="width:512px;"/>
						<rg:inputArea value="#{orderWizardAction.orderFormula.oldDrugBill}" max="256" validateRule="length"
							label="原药单" id="formulaOldDrugBill" textStyle="width:512px;"/>
						<rg:inputArea value="#{orderWizardAction.orderFormula.customerRequire}" max="256" validateRule="length"
							label="客户要求" id="formulaCutomerRequire" textStyle="width:512px;"/>
						<rg:inputArea value="#{orderWizardAction.orderFormula.purpose}" max="256" validateRule="length"
							label="配方作用" id="formulaPurpose" textStyle="width:512px;"/>
						<rg:inputArea value="#{orderWizardAction.orderFormula.lifeNote}" max="512" validateRule="length"
							label="生活注意事项" id="formulaLifeNote" textStyle="width:512px;"/>
						<rg:inputArea value="#{orderWizardAction.orderFormula.remarks}" max="256" validateRule="length"
							label="备注" id="formulaRemarks" textStyle="width:512px;"/>
						<rg:inputText value="#{orderWizardAction.orderFormula.price}" 
							id="formulaPrice" label="原价" textStyle="width:512px;"/>
					</rg:fieldSet>
					<div>注：</div>
					<div><h:outputLabel value="#{printAction.order.orderFormula.note}" converter="#{htmlConverter}" escape="false" /></div>
				</rg:titlePanel>
	</ui:define>
</ui:composition>